package IO.objectstream;

import java.io.Serializable;

/**
 * @author 15594
 */
public class Person implements Serializable {

    private static final long serialVersionUID = 612794470754667710L;

    private  int id;
    private String name;
    private int age;

    private Account  account;

//    transient、static不会序列化，（static是属于类的，不是对象因此不会序列化）
    private transient int a ;
    private static int b=888 ;

    public Person() {
    }

    public Person(int id, String name, int age, Account account, int a) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.account = account;
        this.a = a;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public static int getB() {
        return b;
    }

    public static void setB(int b) {
        Person.b = b;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", account=" + account +
                ", a=" + a +
                '}';
    }
}
